package com.neardrug.services.impl;

import com.neardrug.entity.Analysis;
import com.neardrug.mapper.AnalysisMapper;
import com.neardrug.services.AnalysisService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Collections;
import java.util.List;

@Service
public class AnalysisServiceImpl implements AnalysisService {

    @Autowired
    private AnalysisMapper analysisMapper;

    @Override
    public List<Analysis> selectAll(Integer id) {
        List<Analysis> analysisList=analysisMapper.selectAll(id);
        return analysisList;
    }

    @Override
    public String selectNoteById(Integer id) {
        String notes=analysisMapper.selectNotesById(id);
        return notes;
    }

    @Override
    public void updateAnalysis(Analysis analysis) {
        analysisMapper.updateAnalysis(analysis);
    }

    @Override
    public List<Analysis> selectCollected(Integer id) {
        List<Analysis> analysisList=analysisMapper.selectCollected(id);
        return analysisList;
    }
}
